<!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        Contact Data
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
        <li><a href="#">Web Manage</a></li>
        <li class="active">Contact</li>
    </ol>
</section>

<!-- Main content -->
<section class="content">
    <div class='row'>
        <div class='col-md-12'>
            <div class='box box-info'>
                <div class='box-header'>
                    <h3 class='box-title'>IPPI Contact Detail</h3>
                    <!-- tools box -->
                    <div class="pull-right box-tools">
                        <button class="btn btn-info btn-sm" data-widget='collapse' data-toggle="tooltip" title="Collapse"><i class="fa fa-minus"></i></button>
                    </div><!-- /. tools -->
                </div><!-- /.box-header -->
                <div class='box-body pad'>
                
                    <?php if(isset($success_status)){ ?>
                        <div id="msg_success" class="alert alert-success alert-dismissable">
                            <i class="fa fa-check"></i>
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">�</button>
                            <b>Congratulation!</b> New data has been saved.
                        </div>
                    <?php } else{ ?>
                        <div id="msg" class="alert alert-danger alert-dismissable">
                            <i class="fa fa-ban"></i>
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">�</button>
                            <b>Alert!</b> Danger alert preview. This alert is dismissable. A wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring which I enjoy with my whole heart.
                        </div>
                    <?php } ?>
                    
                    <form id="frm_event" action="<?php echo site_url();?>admin_event/add_event" method="POST" enctype="multipart/form-data" role="form">
                        <div class="form-group">
                            <label>Alamat</label>
                            <input id="alamat" type="text"  class="form-control" placeholder="Masukkan Alamat"/>
                        </div>
                        <div class="form-group">
                            <label>Provinsi</label>
                            <select id="provinsi" class="form-control">
                                <option> - pilih provinsi - </option>
                                <?php
                                foreach ($list_provinsi as $r_p) {
                                    ?>
                                <option value="<?php echo $r_p->state_id;?>"><?php echo $r_p->state_name;?></option>
                                        <?php
                                }
                                ?>
                            </select>
                        </div>
                        <div class="form-group">
                            <label>Kota / kabupaten</label>
                            <select id="kota" class="form-control" >
                                <option> - pilih kota / kabupaten -</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <div class="fileupload-buttonbar">
                                <button type="submit" class="btn btn-primary start">
                                    <i class="glyphicon glyphicon-upload"></i> 
                                    <span>Submit</span>
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div><!-- /.box -->
        </div><!-- /.col-->
    </div><!-- ./row -->
</section><!-- /.content -->

<!-- COMPOSE MESSAGE MODAL -->
<div class="modal fade modal-wide" id="compose-modal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">Add New Image Gallery</h4>
            </div>

            <div class="add-content">
                <?php $this->load->view("mimin/gallery/add_image_form");?>
            </div>
            
            <div class="modal-footer clearfix">
                <button type="button" class="btn btn-danger" data-dismiss="modal"><i class="fa fa-times"></i> Cancel</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<script type="text/javascript" src="<?php echo base_url()?>assets/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
    // Load News Data
    // ===============================================================================
    _load_image_data();
    
    function _load_image_data( url ){
        url     = typeof(url) != 'undefined' ? url : $('#image_data_url').val();
        el      = $("#image_data");
    
        $.ajax({
            type: "GET",
            data: {},
            url: url,
            beforeSend: function (){},
            success: function( response ){
                response = $.parseJSON(response);
                
                if(response.image == ""){
                    $(el).hide().empty();
                }else{
                    $(el).hide().empty();
                    $(el).html(response.image).fadeIn('fast');
                    
                    $('.image_event_cb').iCheck({
                        checkboxClass: 'icheckbox_minimal',
                    });
                }
                return false;
            }
        });
        return false;
    }
</script>